<div>
    <div class="ui top fluid attach container segment">
        <div class="ui blue top attached label">数据统计</div>
        <div class="ui three cards">
            <a class="black card" style="width: 17.3em; height: 12em; margin-left: 2em; margin-right: 2em;">
                <div class="content" style="margin: 3em;">
                    <h1 class="ui center aligned black header" id="account">0</h1>
                    <div class="center aligned description">
                        <p> 合 同 总 量 </p>
                    </div>
                </div>
            </a>
            <a class="blue card" style="width: 17.3em; height: 12em; margin-left: 2em; margin-right: 2em;">
                <div class="content" style="margin: 3em;">
                    <h1 class="ui center aligned blue header" id="processing">0</h1>
                    <div class="center aligned description">
                        <p> 进 行 中 </p>
                    </div>
                </div>
            </a>
            <a class="red card" style="width: 17.3em; height: 12em; margin-left: 2em; margin-right: 2em;">
                <div class="content" style="margin: 3em;">
                    <h1 class="ui center aligned red header" id="pending">0</h1>
                    <div class="center aligned description">
                        <p> 待 处 理 </p>
                    </div>
                </div>
            </a>
            <a class="teal card" style="width: 17.3em; height: 12em; margin-left: 2em; margin-right: 2em;">
                <div class="content" style="margin: 3em;">
                    <h1 class="ui center aligned teal header" id="expired">0</h1>
                    <div class="center aligned description">
                        <p> 已 过 期 </p>
                    </div>
                </div>
            </a>
        </div>
    </div>
</div>

<script>
    $.ajax({
        url: "queryContractCountInfo",
        type: 'post',
        // data: "",
        // async: false,
        beforeSend: (request) => {
            if (constant.csrfToken && constant.csrfHeader) {
                request.setRequestHeader(constant.csrfHeader, constant.csrfToken);
            }
        },
        success: (data) => {
            if ('0' === data.statusCode) {
                $("#account")[0].innerText = data.resultMap.account;
                $("#processing")[0].innerText = data.resultMap.processing;
                $("#pending")[0].innerText = data.resultMap.pending;
                $("#expired")[0].innerText = data.resultMap.expired;
            } else if ('-1' === data.statusCode) {
                // closeWaitPromptBox();
                showErrorPromptBox("", 2);
            }
        },
        error: () => {
            showErrorPromptBox("系统繁忙，请稍后访问！", 2);
        }
    });
</script>
